import { BottomTabNavigationProp } from '@react-navigation/bottom-tabs';
import { CompositeNavigationProp, RouteProp } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';

// 定义Tab导航参数类型
export type TabParamList = {
  Home: undefined;
  Store: undefined;
  Profile: undefined;
};

// 定义Stack导航参数类型
export type RootStackParamList = {
  Main: undefined;
  // 可以在这里添加其他页面路由参数
  // 例如：PetDetail: { petId: string };
};

// 组合导航类型
export type HomeScreenNavigationProp = CompositeNavigationProp<
  BottomTabNavigationProp<TabParamList, 'Home'>,
  StackNavigationProp<RootStackParamList>
>;

export type StoreScreenNavigationProp = CompositeNavigationProp<
  BottomTabNavigationProp<TabParamList, 'Store'>,
  StackNavigationProp<RootStackParamList>
>;

export type ProfileScreenNavigationProp = CompositeNavigationProp<
  BottomTabNavigationProp<TabParamList, 'Profile'>,
  StackNavigationProp<RootStackParamList>
>;

// 路由参数类型
export type HomeScreenRouteProp = RouteProp<TabParamList, 'Home'>;
export type StoreScreenRouteProp = RouteProp<TabParamList, 'Store'>;
export type ProfileScreenRouteProp = RouteProp<TabParamList, 'Profile'>; 